package com.xiaojie.dao;

import java.util.List;
import java.util.Map;

/**
 * @classname: DataOperate
 * @description: 数据操作接口
 * @author: wangye
 * @date: 2021/6/25 16:32
 **/
public interface EDIDataOperate {
    /**
     * 查询数据
     *
     * @param tableName
     * @param fields
     * @param params
     * @auther wangye
     * @date 2021/6/25
     */
    List<Map> selectData(String tableName, String fields, List<Param> params, String split);

    List<Map> selectData(String tableName, String fields, String paramName, Object paramValue, String split);

    default List<Map> selectData(String tableName, String fields, List<Param> params) {
        return selectData(tableName, fields, params, "and");
    }

    default List<Map> selectData(String tableName, String fields, String paramName, Object paramValue) {
        return selectData(tableName, fields, paramName, paramValue, "and");
    }

    List<Map> selectAll(String tableName, String fields);

    void insert(String sql);
}
